package com.dykj.fireFighting.common.core.utils;

/**
 * @Author fgc
 * @Date 2021/10/11 17:15
 * @ Description：运行记录数据清洗
 */
public class DataCleaningUtil {
    public static  String dataCleaning(String bjztSm){
        String result="";
        if(bjztSm==null){
            result="正常";
        }else if(bjztSm.indexOf("正常,备电正常,停止,手动,主电正常,总线正常,测试运行")!= -1){
            result="正常";
        }else if(bjztSm.indexOf("无反馈")!= -1){
            result="无反馈";
        }else if(bjztSm.indexOf("故障恢复")!= -1){
            result="故障恢复";
        } else if(bjztSm.indexOf("备电故障")!= -1){
            result="备电故障";
        } else if(bjztSm.indexOf("总线故障")!= -1){
            result="总线故障";
        } else if(bjztSm.indexOf("故障")!= -1){
            result="故障";
        }else if(bjztSm.indexOf("火警")!= -1){
            result="火警";
        }else if(bjztSm.indexOf("监管")!= -1){
            result="监管";
        }else if(bjztSm.indexOf("动作")!= -1){
            result="动作";

        }else if(bjztSm.indexOf("启动")!= -1){
            result="启动";

        }else if (bjztSm.indexOf("反馈")!= -1){
            result="反馈";

        }else if (bjztSm.indexOf("恢复")!= -1){
            result="恢复";

        }else if (bjztSm.indexOf("屏蔽解除")!= -1){
            result="屏蔽解除";

        }else if (bjztSm.indexOf("屏蔽")!= -1){
            result="屏蔽";

        }else if (bjztSm.indexOf("复位")!= -1){
            result="复位";

        }else{
            result=bjztSm;
            
        }
    return  result;
    }
}
